home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / stuffit.arc / ERRMSG.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-11-18  |  1.8 KB  |  81 lines

  1. errmsg        proc    near
  2.         jmp    chk2
  3.  
  4. ;----------------------------------------------------------
  5. ;        constants and messages
  6.  
  7. cr        equ    13
  8. lf        equ    10
  9. eos        equ    '$'
  10. err2_msg    db    '-File not found-',cr,lf,eos
  11. err3_msg    db    '-Path not found-',cr,lf,eos
  12. err4_msg    db    '-Too many open files (no handles left)-',cr,lf,eos
  13. err5_msg    db    '-Access denied-',cr,lf,eos
  14. err6_msg    db    '-Invalid handle-',cr,lf,eos
  15. err12_msg    db    '-Invalid access code-',cr,lf,eos
  16. err17_msg    db    '-Not same device-',cr,lf,eos
  17. err18_msg    db    '-No more files-',cr,lf,eos
  18. bad_err_msg    db    '-Unrecognized error code-',cr,lf,eos
  19.  
  20. ;----------------------------------------------------------
  21. ;        subroutines
  22.  
  23. msg_out        proc    near        
  24.                     ;DX has offset of message
  25.         mov    ah,9h        ;Print string function call
  26.         int    21h
  27.         ret
  28. msg_out        endp        
  29.  
  30. ;----------------------------------------------------------
  31. ;        main code section
  32.  
  33. chk2:        cmp    ax,2
  34.         jne    chk3
  35.         mov    dx,offset err2_msg
  36.         call    msg_out
  37.         jmp    errmsg_exit
  38. chk3:        cmp    ax,3
  39.         jne    chk4
  40.         mov    dx,offset err3_msg
  41.         call    msg_out
  42.         jmp    errmsg_exit
  43. chk4:        cmp    ax,4
  44.         jne    chk5
  45.         mov    dx,offset err4_msg
  46.         call    msg_out
  47.         jmp    errmsg_exit
  48. chk5:        cmp    ax,5
  49.         jne    chk6
  50.         mov    dx,offset err5_msg
  51.         call    msg_out
  52.         jmp    errmsg_exit
  53. chk6:        cmp    ax,6
  54.         jne    chk12
  55.         mov    dx,offset err6_msg
  56.         call    msg_out
  57.         jmp    errmsg_exit
  58. chk12:        cmp    ax,12
  59.         jne    chk17
  60.         mov    dx,offset err12_msg
  61.         call    msg_out
  62.         jmp    errmsg_exit
  63. chk17:        cmp    ax,17
  64.         jne    chk18
  65.         mov    dx,offset err17_msg
  66.         call    msg_out
  67.         jmp    errmsg_exit
  68. chk18:        cmp    ax,18
  69.         jne    bad_err
  70.         mov    dx,offset err18_msg
  71.         call    msg_out
  72.         jmp    errmsg_exit
  73. bad_err:    mov    dx,offset bad_err_msg
  74.         call    msg_out
  75.         jmp    errmsg_exit        
  76.                 
  77. errmsg_exit:
  78.         ret
  79.  
  80. errmsg        endp
  81.